how are stars formed step by step